package cn.kgc.controller;

import cn.kgc.pojo.GoodsSort;
import cn.kgc.service.GoodsSortService;
import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class GoodsSortController {
    @Resource
    private GoodsSortService goodsSortService;

    @RequestMapping(value = "/queryAllSort")
    @ResponseBody
    public String queryAllSort(){
        List<GoodsSort> list=goodsSortService.queryAllSort();
        return JSON.toJSONString(list);
    }
}
